package cn.news.control;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.news.biz.RegisterBiz;

public class UserRegisterServlet extends HttpServlet{
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		response.setContentType("text/html;charset=utf-8");
		String name=request.getParameter("name");
		PrintWriter out=response.getWriter();
		RegisterBiz rBiz=new RegisterBiz();
		boolean flag=rBiz.searchKey(name);
			if(flag){
				out.print("cunzai");
			}else{
				out.print("bu");
			
		}
	}
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		doGet(req, resp);
	}
}
